function rules = GetRules( InitData, Rules )
%GETRULES output rules like text
  count = size(Rules,1);
  for i=1:count
    rules{i} = '';
    for j=1:InitData.FeatureCount
%      rule = sprintf('X%i is %s ', j, InitData.LinguisticVariablesNames{Rules(i,j)});
      rule = sprintf('X%i is %s ', j, InitData.LinguisticVariablesNames(Rules(i,j),:));      
      rules{i} = strcat(rules{i}, rule);
    end
%    rule = sprintf('then %s\n', InitData.ClassNames{Rules(i,end)});
    rule = sprintf('then %s\n', InitData.ClassNames(Rules(i,end),:));
    rules{i} = strcat(rules{i}, rule);
  end%for i

end

